#ifndef MAINWINDOWMENU_H
#define MAINWINDOWMENU_H

#include <QMainWindow>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include <QMessageBox>
#include <QTextBrowser>

#include "mainwindowhomepage.h"

#define DISHES_NUM  19

//外部声明套接字
extern QTcpSocket *tcpSocket;

//定义一个菜单结构体
struct dishInfo
{
    //菜名
    QString dishName[19];

    //价格
    int dishPrice[19];

    //数量
    int dishNum[19];
};

namespace Ui {
class MainWindowMenu;
}

class MainWindowMenu : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindowMenu(QWidget *parent = nullptr);
    ~MainWindowMenu();

    //用于从上一个界面发送过来的桌号和人数
    void recvInfo(QString deskNum, QString peopleNum);

private slots:
    void on_btn_back_clicked();

//    void onConnectedSlot();

    void onRecvMenuDataSlot();

    void on_btn_submit_clicked();

    void on_btn_call_clicked();

    void on_btn_pay_clicked();

    void sendInfoSlots2();

    void on_pushButton_3_clicked();

    void paySlots1();

    void sendPayInfo();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

    void on_pushButton_13_clicked();

    void on_pushButton_14_clicked();

private:
    Ui::MainWindowMenu *ui;

    QPushButton *button1;
    QPushButton *button2;
    QPushButton *button3;
    QPushButton *button4;
    QPushButton *button5;

    QString usrInfo;

    dishInfo info;
};

#endif // MAINWINDOWMENU_H
